import java.util.ArrayList;
import java.util.Collections;

public class Deck {
	ArrayList<Card> deck = new ArrayList<Card>();
	char[] suits = { 'D', 'C', 'H', 'S'};

	public Deck() {
		initializeDeck();
	}

	/**
	 *
	 */
	private void initializeDeck() {
		for (int i = 0; i < 52; i++){
			deck.add(new Card());
		}
		int value = 1, i = 0;
		char suit = suits[i];
		for (Card card : deck) {
			if (value == 14){
				value = 1;
				suit = suits[++i];
			}
			card.setCard(value, suit);
			value++;
		}
		Collections.shuffle(deck);

	}

	public ArrayList<Card> getDeck() {
		return deck;
	}

	public void setDeck(ArrayList<Card> deck) {
		this.deck = deck;
	}

	public char[] getSuits() {
		return suits;
	}

	public void setSuits(char[] suits) {
		this.suits = suits;
	}
}
